@extends('admin.layout.main')
@section("content")
    <form class="layui-form" action="/admin/business" method="post">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>商机新增</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">商机名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required"  autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">分配客户</label>
                <div class="layui-input-inline">
                    <select name="customer_id">
                        <option value="">请选择一位客户</option>
                        <optgroup label="客户">
                            @foreach($customers as $user)
                                <option value="{{$user->id}}">{{$user->company_name}}</option>
                            @endforeach
                        </optgroup>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">分配用户</label>
                <div class="layui-input-inline">
                    <select name="user_id">
                        <option value="">请选择一位员工成为商机的负责人</option>
                        <optgroup label="员工">
                            @foreach($users as $user)
                                <option value="{{$user->id}}">{{$user->name}}</option>
                            @endforeach
                        </optgroup>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">产品信息选择</label>
                <div class="layui-input-inline">
                    <select name="product_id">
                        <option value="">请选择一款产品</option>
                        <optgroup label="产品">
                            @foreach($products as $user)
                                <option value="{{$user->id}}">{{$user->describe}}</option>
                            @endforeach
                        </optgroup>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">商机金额</label>
                <div class="layui-input-inline" style="width: 100px;">
                    <input type="text" lay-verify="required"  name="money" placeholder="￥" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商机进度</label>
            <div class="layui-input-block">
                <input type="text" name="progress"  lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">成交几率</label>
            <div class="layui-input-inline">
                <input type="text" name="transaction_probability" lay-verify="required"  autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">下次联系时间</label>
            <div class="layui-input-inline">
                <input type="text" name="next_time" id="date" lay-verify="datetime" placeholder="yyyy-MM-dd HH:mm:ss" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="remark"  class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
@endsection
